package com.selftest.factory;

import com.selftest.servlet.MyServlet;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.boot.web.servlet.support.SpringBootServletInitializer;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import java.util.HashMap;
import java.util.Map;

@Configuration
public class InitServlet extends SpringBootServletInitializer {

    /*@Bean
    public MyServlet myServlet() {
        return new MyServlet();
    }

    @Bean
    public ServletRegistrationBean dispatcherServletRegistration(){
        ServletRegistrationBean registrationBean = new ServletRegistrationBean(myServlet());
        Map<String, String> params = new HashMap<>();
        params.put("aaa","123");
        registrationBean.setInitParameters(params);
        return registrationBean;
    }*/


}
